1. Field of the Invention
The present invention relates to a network device in a data network and, more particularly, to shaping and metering traffic through a network device at a client and virtual port levels.
2. Description of the Related Art
A packet switched network may include one or more network devices, such as an Ethernet switching chip, each of which includes several modules that are used to process information that is transmitted through the device. Specifically, the device includes a router, a Memory Management Unit (MMU), and an egress module. The router includes switching functionality for determining to which destination port a packet should be directed. The MMU is used for storing packet information and for performing resource checks. An ingress module processes incoming packets.
The egress module is used for performing packet modification and for transmitting the packet to at least one appropriate destination port. One of the ports on the device may be a CPU port that enables the device to send and receive information to and from external switching/routing control entities or CPUs.
Accordingly, network devices often have to monitor the flow of traffic through the network device to determine whether there are points of congestion. The traffic through the device may have specific priorities, such as class-of-service (COS) or Quality-of-Service (QoS), and the monitoring of traffic may be useful in making sure that those priorities are preserved. In addition to monitoring, the traffic through the network device can also be shaped to meet specific requirements. The shaping allows for the network device to accommodate minimum, maximum, and bursty requirements.
A router's switch fabric can deliver packets from multiple ingress ports to one of a number of egress ports. The linecard connected to this egress port must then transmit these packets over some communication medium to the next router in the network. The rate of transmission is normally limited to a standard rate. Accordingly, a queue per COS has been provided so that traffic routed through higher priority queues can bypass that in lower priority queues. Certain queues may also be assured a guaranteed portion of the available output line bandwidth. On first sight, the traffic handling task appears to be straightforward. Packets are placed in queues according to their required class of service. Scheduling, in turn, controls the de-queuing process by dividing the available output line bandwidth between the queues. In a conventional approach to traffic scheduling, one might typically place packets directly into an appropriate queue on arrival, and then subsequently dequeue packets from those queues into an output stream. However, the packet arrival rate can be very high due to overspeed in the packet delivery from the switch fabric, which demands high data read and write bandwidth into memory. Thus, the processing overhead of some scheduling is high. Also, in conventional routers, often times there are no sufficient queuing structures to the egress module.
Thus, a router is needed that would be highly configurable to provide a sufficient scheduling structure to support various COS. A scheduler that is needed is one that may be able to provide more fine grained queuing and scheduling of data to a port, which may include virtual ports, each including multiple COS.